package link.gpt.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * user
 * @author
 */
public class User implements Serializable {


   private UserType userType;

   public UserType getUserType() {
      return userType;
   }

   public void setUserType(UserType userType) {
      this.userType = userType;
   }

   /**
    * 用户id
    */
   private Integer id;

   /**
    * 用户名称
    */
   private String name;

   /**
    * 密码
    */
   private String password;

   /**
    * 用户状态
    */
   private Integer status;

   /**
    * 最新的更新时间
    */
   private Date lastModifyTime;

   /**
    * 用户类型
    */
   private Integer typeId;

   private static final long serialVersionUID = 1L;

   public Integer getId() {
      return id;
   }

   public void setId(Integer id) {
      this.id = id;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public String getPassword() {
      return password;
   }

   public void setPassword(String password) {
      this.password = password;
   }

   public Integer getStatus() {
      return status;
   }

   public void setStatus(Integer status) {
      this.status = status;
   }

   public Date getLastModifyTime() {
      return lastModifyTime;
   }

   public void setLastModifyTime(Date lastModifyTime) {
      this.lastModifyTime = lastModifyTime;
   }

   public Integer getTypeId() {
      return typeId;
   }

   public void setTypeId(Integer typeId) {
      this.typeId = typeId;
   }

   @Override
   public boolean equals(Object that) {
      if (this == that) {
         return true;
      }
      if (that == null) {
         return false;
      }
      if (getClass() != that.getClass()) {
         return false;
      }
      User other = (User) that;
      return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
              && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
              && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
              && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
              && (this.getLastModifyTime() == null ? other.getLastModifyTime() == null : this.getLastModifyTime().equals(other.getLastModifyTime()))
              && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()));
   }

   @Override
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
      result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
      result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
      result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
      result = prime * result + ((getLastModifyTime() == null) ? 0 : getLastModifyTime().hashCode());
      result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
      return result;
   }

   @Override
   public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(getClass().getSimpleName());
      sb.append(" [");
      sb.append("Hash = ").append(hashCode());
      sb.append(", id=").append(id);
      sb.append(", name=").append(name);
      sb.append(", password=").append(password);
      sb.append(", status=").append(status);
      sb.append(", lastModifyTime=").append(lastModifyTime);
      sb.append(", typeId=").append(typeId);
      sb.append(", serialVersionUID=").append(serialVersionUID);
      sb.append("]");
      return sb.toString();
   }
}